package com.china08.yxyapi.repository.mg.continuedu;

import java.util.List;

import org.springframework.data.mongodb.repository.MongoRepository;

import com.china08.yxyapi.entity.mg.continuedu.YxyContinueduUserTaskLessonItem;

public interface YxyContinueduUserTaskLessonItemRepository
        extends MongoRepository<YxyContinueduUserTaskLessonItem, String> {

    YxyContinueduUserTaskLessonItem findById(String itemId);

    List<YxyContinueduUserTaskLessonItem> findByUserIdAndLessonId(String userId, String lessonId);

    List<YxyContinueduUserTaskLessonItem> findByUserIdAndTaskIdAndLessonIdOrderByOrderNumAsc(String userId,
            String taskId, String lessonId);

    Integer countByTaskIdAndLessonIdAndStatusAndUserId(String taskId, String lessonId, int i, String userId);

    Integer countByTaskIdAndLessonIdAndUserId(String taskId, String lessonId, String userId);

    Integer countByUserIdAndTaskIdAndStatus(String userId, String taskId, int i);

    Integer countByUserIdAndTaskId(String userId, String taskId);

}
